package com.example.demo.auto.entityhelp;

import com.beiding.businessplatform.data.BeHelp;
import com.beiding.businessplatform.data.HelpRegedit;
import com.example.demo.auto.entity.ABe;
import com.example.demo.auto.entity.BBe;
import com.example.demo.auto.entity.CBe;

import java.util.HashMap;
import java.util.Map;

//TODO 注册表
public class HelpRegeditImpl implements HelpRegedit {

    public static HelpRegedit INSTANCE = new HelpRegeditImpl();

    private static Map<Class, BeHelp> map = new HashMap<Class, BeHelp>() {
        {
            put(ABe.class, new ABeHelp());
            put(BBe.class, new BBeHelp());
            put(CBe.class, new CBeHelp());
        }
    };

    @Override
    public BeHelp getHelp(Class type) {
        return map.get(type);
    }
}
